package cn.korilweb.demodictionary.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import lombok.Data;

import java.util.List;

/**
 * @author DJH
 * @date 2021-10-26 21:29:13
 */
@Data
@JsonIgnoreProperties(value={"parent"})
@JsonPropertyOrder(value = {"data", "children"})
public class TreeNode<T> {

    private TreeNode<?> parent;

    private Integer parentInfoId;

    private List<TreeNode<?>> children;

    private T data;

    @Override
    public String toString() {
        return "TreeNode{" +
                "data=" + data +
                '}';
    }
}
